﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucGetByCate.ascx.cs"
    Inherits="TTMarketing.CameraUserControl.SanPham.ucGetByCate" %>

    <div class="main-content-title">
    <img src="../Styles/images/web_camera.png" alt="" width="20" height="20" 
            align="absmiddle" /><asp:Label ID="lblTitle" runat="server" ></asp:Label></div>
<table width="100%">
    <tr>
        <td>
            <asp:ObjectDataSource ID="odsProduct" runat="server" 
                SelectMethod="Product_getByCate" TypeName="TTController.clsCTProcess">
                <SelectParameters>
                    <asp:QueryStringParameter Name="cateid" QueryStringField="cateid" 
                        Type="Int32" />
                    <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
                    <asp:Parameter DefaultValue="true" Name="visible" Type="Boolean" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="odsProduct" BorderWidth="0px"
                ItemPlaceholderID="ph" AllowPaging="True" PageSize="15" Width="100%" 
                onitemcommand="RadListView1_ItemCommand" 
                onprerender="RadListView1_PreRender">
                <LayoutTemplate>
                    <asp:PlaceHolder runat="server" ID="ph" />
                </LayoutTemplate>
                <ItemTemplate>
                 <div class="main-content-palce">
          <div class="main-content">
                    <table width="100%" id="Product-l">
                        <tr>
                            <td align="center"  style="width:249px" valign="top">
                                <a href='?id=<%# Eval("ID") %>' title='<%#Eval("Name") %>'>
                                    <img src='<%# "/Image/Upload/" +Eval("Image") %>' class="photduct-photo" />
                                </a>
                            </td>
                            <td align="left" valign="top">
                                
                                <table width="100%" style="height:100%;">
                                    <tr>
                                        <td height="160px" valign="top">
                                        <a href='?id=<%# Eval("ID") %>' title='<%#Eval("Name") %>'>
                                    <%#Eval("Name") %></a>
                                <br />
                                <asp:DataList ID="DataList1" runat="server" DataSource='<%# Eval("tblProduct_Attributes") %>'
                                    Width="100%">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Eval("tblCate_Attribute.tblAttribute.Name") %>'></asp:Label>
                                        &nbsp;:
                                        <asp:Label ID="Label6" runat="server" Text='<%# Eval("Value") %>'></asp:Label>
                                        <br />
                                    </ItemTemplate>
                                </asp:DataList>
                                <br />
                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("SeriNumber") %>'></asp:Label>

                                            </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                        <asp:HiddenField ID="hfPrice" runat="server" Value='<%# Eval("Price") %>' />
                                            <asp:HiddenField ID="hfName" runat="server" Value='<%# Eval("Name") %>' />
                                            <asp:ImageButton ID="btnNganLuong" runat="server" Height="22px" Width="85px"
                                                ImageUrl="~/Styles/Images/ngang-luong-thanh-toan.gif" />
                                            &nbsp;<asp:ImageButton ID="btnDatMua" runat="server" 
                                                ImageUrl="~/Styles/Images/buy.png" CommandArgument='<%# Eval("ID") %>' 
                                                CommandName="Mua" />
                                            &nbsp;</td>
                                    </tr>
                                </table>
                                
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="style1">
                                &nbsp;
                            </td>
                            <td align="center">
                             <asp:HyperLink ID="btnSosanh" runat="server" NavigateUrl="~/#" >Thêm vào so sánh</asp:HyperLink>
                                  <asp:HiddenField ID="hfID" runat="server" Value='<%# Eval("ID") %>' />
                                  <img src="Styles/Images/edit_redo.png" border="0" />
                                <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("ID", "~/san-pham.aspx?id={0}") %>'>Xem chi tiết</asp:HyperLink>
                            </td>
                        </tr>
                    </table>
                     </div>
                    <div class="main-content-botton">
            </div>
                </ItemTemplate>
                <EmptyDataTemplate>
                    <div class="RadListView RadListView_Default">
                        <div class="rlvEmpty">
                            Dữ liệu đang cập nhật</div>
                    </div>
                </EmptyDataTemplate>
            </telerik:RadListView>
        </td>
    </tr>
    <tr>
        <td>
            <div id="pageing">
                <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                    BackColor="White" BorderStyle="None" PageSize="20" Skin="Sitefinity" Width="90%">
                    <Fields>
                        <telerik:RadDataPagerSliderField />
                        <telerik:RadDataPagerPageSizeField />
                    </Fields>
                </telerik:RadDataPager>
            </div>
        </td>
    </tr>
</table>
